import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { EventsComponent } from './events/events.component';
import { InsightsComponent } from './insights/insights.component';
import { NotificationsComponent } from './notifications/notifications.component';
import { TableModule } from '../../shared/components/table/table.module';
import { SpotlightsComponent } from './spotlights/spotlights.component';
import { FormsModule } from '@angular/forms';
import { PipesModule } from '../../shared/pipes/pipes.module';
import { ToasterModule } from 'angular2-toaster';
import { SpotlightComponent } from './spotlights/spotlight/spotlight.component';
import { UiSwitchModule } from 'ngx-toggle-switch';
import { BsDatepickerModule } from 'ngx-bootstrap';
import { TagInputModule } from 'ngx-chips';
import { QuillModule } from 'ngx-quill'
import { EventComponent } from './events/event/event.component';
import { InsightComponent } from './insights/insight/insight.component';
import { InsightsService } from './insights/insights.service';
import { FileUploadModule } from 'ng2-file-upload';

const routes: Routes = [
  {
    path: 'spotlights',
    component: SpotlightsComponent
  },
  {
    path: 'spotlights/:edit/:id',
    component: SpotlightComponent
  },
  {
    path: 'events',
    component: EventsComponent
  },  
  {
    path: 'events/:edit/:id',
    component: EventComponent
  },
  {
    path: 'insights',
    component: InsightsComponent
  },
  {
    path: 'insights/:edit/:id',
    component: InsightComponent
  },
  {
    path: 'notifications',
    component: NotificationsComponent
  }
];

@NgModule({
  imports: [
    CommonModule,
    TableModule,
    FormsModule,
    PipesModule,
    UiSwitchModule,
    TagInputModule,
    QuillModule,
    FileUploadModule,
    RouterModule.forChild(routes),
    ToasterModule.forRoot(),
    BsDatepickerModule.forRoot()
  ],
  declarations: [
    SpotlightsComponent,
    SpotlightComponent,
    EventsComponent,
    EventComponent,
    InsightsComponent,
    InsightComponent,
    NotificationsComponent
  ],
  providers: [InsightsService]
})
export class KnowledgeCenterModule { }
